package top.frsf.envi;

import top.frsf.GamePanel;

import java.awt.*;

/**
 * @BelongsProject: MiniPZ
 * @BelongsPackage: top.frsf.envi
 * @Author: FRSF
 * @CreateTime: 2022-09-14  12:58
 * @Description: 游戏选择界面
 * @Version: 1.0
 */
public class Home {
    public static final String PREFIX = "src/main/resources/envi/start/";
    public static final Image MAIN_RIGHT = GamePanel.tKit.getImage(PREFIX + "right.png");
    public static final Image MAIN_LEFT = GamePanel.tKit.getImage(PREFIX + "left.png");
    public static final Image MAIN_CENTER = GamePanel.tKit.getImage(PREFIX + "center.png");
    public static final Image MAIN_TOP = GamePanel.tKit.getImage(PREFIX + "blue.jpg");
    public static final Image ADVENTURE = GamePanel.tKit.getImage(PREFIX + "adventure.png");
    public static final Image HIGHT = GamePanel.tKit.getImage(PREFIX + "ad_hight.png");
    public static final Image BLOCK = GamePanel.tKit.getImage(PREFIX + "block.png");
    public static final Image OPTION = GamePanel.tKit.getImage(PREFIX + "option.png");
    public static final Image HELP = GamePanel.tKit.getImage(PREFIX + "help.png");
    public static final Image QUIT = GamePanel.tKit.getImage(PREFIX + "quit.png");
    public static final Image LEAVES = GamePanel.tKit.getImage(PREFIX + "leaves.png");

    public Rectangle game = new Rectangle(515, 126, 300, 100);
    public boolean showHight = false;


    public void paintSelf(Graphics g) {
        g.drawImage(MAIN_TOP, 0, 0, 900, 600, 0, 0, 100, 75, null);
        g.drawImage(MAIN_CENTER, 50, 250, 780, 600, 0, 0, 720, 350, null);
        g.drawImage(MAIN_RIGHT, 163, 70, null);
        g.drawImage(MAIN_LEFT, 0, 0, null);
        g.drawImage(BLOCK, 0, 20, null);
        g.drawImage(OPTION, 650, 520, null);
        g.drawImage(HELP, 740, 550, null);
        g.drawImage(QUIT, 815, 540, null);
        g.drawImage(LEAVES, 300, 580, null);
        if (showHight) {
            g.drawImage(HIGHT, 500, 120, null);
        } else {
            g.drawImage(ADVENTURE, 500, 120, null);
        }
    }
}
